//
//  PKLoginViewModel.swift
//  Panku
//
//  Created by mac on 2017/4/7.
//  Copyright © 2017年 Monster. All rights reserved.
//

import UIKit
import ReactiveCocoa
import ReactiveSwift
import Result
import SVProgressHUD

class PKLoginViewModel: NSObject {
    
    //actions
    func actionForLogin() -> Action<(String,String,String),Any,NSError>{
        return Action({ (parameters) -> SignalProducer<Any, NSError> in
            
            let accessId = parameters.0
            let accessType = parameters.1
            let passwd = parameters.2
            
            return PKLoginServices.login(accessId: accessId, accessType: accessType, passwd: passwd)
        })
    }
    
    func viewModelForRegisterViewController() -> PKRegisterViewModel{
        return PKRegisterViewModel()
    }
    
    
}
